<template>
    <div>
        <p @click="addValueA(obj)"> {{obj['valueA']}} </p>
        <p @click="addValueB(obj)"> {{obj['valueB']}} </p>
    </div>
</template>
<script>
    export default {
        data(){
            return {
                obj: {valueA: 0},
            }
        },
        created() {
            this.$set(this.obj,'valueB',0);
            console.log(this.obj);
        },
        methods: {
            addValueA(obj) {
                obj.valueA = obj.valueA + 1;
                console.log('valueA--' + obj.valueA);
            },
            addValueB(obj) {
                obj.valueB = obj.valueB + 1;
                console.log('valueB--' + obj.valueB );
            }
        }
    }
</script>

<style scoped>

</style>